import { DashboardOutlined, ProfileOutlined, NotificationOutlined, UserOutlined } from '@ant-design/icons'
import Login from '../views/login'
import NotFound from '../views/notFound'
import Message from '../views/message'
import DashBoard from '../views/dashboard'
import Profile from '../views/profile'
import Notifications from '../views/notifications'

const constantRoutes = [
  {
    path:'/login',
    component:Login
  },
  {
    path:'/404',
    component:NotFound
  }
]
const asyncRoutes = [
  
  {
    path:'/admin/dashboard',
    component:DashBoard,
    meta:{
      title:'仪表盘',
      icon:DashboardOutlined
    }
  },
  {
    path:'/admin/message',
    component:Message,
    meta:{
      title:'登记信息',
      icon:ProfileOutlined,
      roles:['admin','editor']  //只有这两个角色才可以看到这个界面
    }
  },
  {
    path:'/admin/notifications',
    component:Notifications,
    meta:{
      title:'信息中心',
      icon:NotificationOutlined 
    }
  },
  {
    path:'/admin/profile',
    component:Profile,
    meta:{
      title:'个人中心',
      icon:UserOutlined
    }
  },
  
]
export {constantRoutes,asyncRoutes}